// 引入初始化样式
import '@/styles/common.scss'

import { createApp } from 'vue'
import { createPinia } from 'pinia'
import piniaPluginPersistedstate  from 'pinia-plugin-persistedstate'
import App from './App.vue'
import router from './router'


//导入全局指令对象
import imgLazy from '@/directives/img-lazy'
//导入全局组件
import { componentPlugin } from '@/components/index'

const app = createApp(App)
const pinia = createPinia()
// 注册持久化插件
pinia.use(piniaPluginPersistedstate)

//注册插件
app.use(imgLazy)
// 注册全局组件
app.use(componentPlugin)

app.use(pinia)
app.use(router)

app.mount('#app')

